home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / tsbat36.zip / BOOT.BAT < prev    next >
DOS Batch File  |  1992-08-04  |  2KB  |  80 lines

  1. echo off
  2. echo.
  3. echo ┌─────────────────────────────────────────────────┐
  4. echo │ Choose the boot configuration for the next boot │
  5. echo │ By Prof. Timo Salmi, ts@uwasa.fi, 4-Aug-1992    │
  6. echo └─────────────────────────────────────────────────┘
  7. echo.
  8.  
  9. rem Put a line with the word "Description:" into your alternative
  10. rem autoexec.bat files to show which boot is now on, E.g.
  11. rem Description: LastByte upper memory manager boot
  12.  
  13. rem If no parameter give help, and show the current boot choice
  14. if "%1"=="" goto _help
  15.  
  16. rem Turn off the read-only attribute
  17. attrib -r c:\autoexec.bat
  18. attrib -r c:\config.sys
  19.  
  20. rem Choose the next boot
  21. for %%f in (1 2 3 4) do if "%1"=="%%f" goto _%%f
  22. echo Unknown option %1
  23. echo.
  24. goto :_help
  25.  
  26. :_1
  27. copy c:\confnorm.sys c:\config.sys > nul
  28. copy c:\autonorm.bat c:\autoexec.bat > nul
  29. goto _common
  30.  
  31. :_2
  32. copy c:\conftlb.sys c:\config.sys > nul
  33. copy c:\autotlb.bat c:\autoexec.bat > nul
  34. goto _common
  35.  
  36. :_3
  37. copy c:\confcd.sys c:\config.sys > nul
  38. copy c:\autocd.bat c:\autoexec.bat > nul
  39. goto _common
  40.  
  41. :_4
  42. copy c:\conftest.sys c:\config.sys > nul
  43. copy c:\autotest.bat c:\autoexec.bat > nul
  44. goto _common
  45.  
  46. rem Instructions to the user
  47. :_common
  48. set _return=_altcd
  49. goto _subru
  50. :_altcd
  51. echo.
  52. echo ALT-CTRL-DEL to boot
  53.  
  54. rem Turn on the read-only attribute for safety
  55. attrib +r c:\autoexec.bat
  56. attrib +r c:\config.sys
  57. goto :_out
  58.  
  59. rem Help for the user.  Customize as appropriate. If you have a number
  60. rem of options from mine, also edit the "for" statement earlier
  61. :_help
  62. echo Usage: BOOT [Choice]
  63. echo.
  64. echo 1 = My normal MsDos 3.3 boot
  65. echo 2 = LastByte upper memory manager boot
  66. echo 3 = CDROM boot
  67. echo 4 = Test configuration
  68. echo.
  69. set _return=_out
  70.  
  71. :_subru
  72. rem Batch subroutine to show which boot choice is the currently selected
  73. echo The current boot is
  74. find "Description:" c:\autoexec.bat
  75. goto %_return%
  76.  
  77. :_out
  78. set _return=
  79. echo on
  80.